IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[cms_sp_EntityMetaAdd]') AND type in (N'P', N'PC'))
	DROP PROCEDURE [dbo].[cms_sp_EntityMetaAdd]
GO
create procedure [dbo].[cms_sp_EntityMetaAdd]
@Id int = null output,
@EntityMetaFieldLinkId int,
@EntityId int,
@EntityMetaValue nvarchar(max)
as
insert into [dbo].[EntityMetas](
EntityMetaFieldLinkId,
EntityId,
EntityMetaValue
)
values(
@EntityMetaFieldLinkId,
@EntityId,
@EntityMetaValue
)
set @Id = SCOPE_IDENTITY()
return @Id


GO

